package com.library_manager_system;

public class Book {
	
	private String author;//作者
	private String press;//出版社
	private String book_name;//书名
	private String press_year;//出版年份
	
	private int press_time;//版次
	private int ISBN;//ISBN书号
	private int book_price;//书价
	private int book_number;//总数量
	private int borrow_book_number;//借出的数量
	private int the_rest_number;//现余本数
	

	public Book(String author, String press, String book_name,
			String press_year, int press_time, int iSBN, int book_price,
			int book_number, int borrow_book_number, int the_rest_number) {
		super();
		this.author = author;
		this.press = press;
		this.book_name = book_name;
		this.press_year = press_year;
		this.press_time = press_time;
		ISBN = iSBN;
		this.book_price = book_price;
		this.book_number = book_number;
		this.borrow_book_number = borrow_book_number;
		this.the_rest_number = the_rest_number;
	}


	public String getAuthor() {
		return author;
	}


	public void setAuthor(String author) {
		this.author = author;
	}


	public String getPress() {
		return press;
	}


	public void setPress(String press) {
		this.press = press;
	}


	public String getBook_name() {
		return book_name;
	}


	public void setBook_name(String book_name) {
		this.book_name = book_name;
	}


	public String getPress_year() {
		return press_year;
	}


	public void setPress_year(String press_year) {
		this.press_year = press_year;
	}


	public int getPress_time() {
		return press_time;
	}


	public void setPress_time(int press_time) {
		this.press_time = press_time;
	}


	public int getISBN() {
		return ISBN;
	}


	public void setISBN(int iSBN) {
		ISBN = iSBN;
	}


	public int getBook_price() {
		return book_price;
	}


	public void setBook_price(int book_price) {
		this.book_price = book_price;
	}


	public int getBook_number() {
		return book_number;
	}


	public void setBook_number(int book_number) {
		this.book_number = book_number;
	}


	public int getBorrow_book_number() {
		return borrow_book_number;
	}


	public void setBorrow_book_number(int borrow_book_number) {
		this.borrow_book_number = borrow_book_number;
	}


	public int getThe_rest_number() {
		return the_rest_number;
	}


	public void setThe_rest_number(int the_rest_number) {
		this.the_rest_number = the_rest_number;
	}
	
	public int borrow(){
		borrow_book_number++;
		the_rest_number--;
		return the_rest_number;
	}
	
	public void huan(){
		borrow_book_number--;
		the_rest_number++;
	}
	
	
	
	public void showAll() {
		// TODO Auto-generated method stub
		System.out.println("主编:"+author);
		System.out.println("出版社:"+press);
		System.out.println("出版年:"+press_year);
		System.out.println("版次:"+press_time);
		System.out.println("ISBN:"+ISBN);
		
		System.out.println("书名:"+book_name);
		System.out.println("定价:"+book_price);
		System.out.println("拥有本数:"+book_number);
		System.out.println("借出本数:"+borrow_book_number);
		System.out.println("现余本数:"+the_rest_number);
		
	}
	
	
	
}
